## #
## 代理组织和结构
## #

from attr import attrs, attr

@attrs
class Proxy(object):
    host = attr(type=str, default=None)
    port = attr(type=int, default=None)

    def __str__(self):
        """
        用来打印
        :return:
        """
        return f'{self.host}:{self.port}'
    
    def string(self):
        """
        解析
        :return: <host>:<port>
        """
        return self.__str__()